
import { EnemyManager } from "../Base/EnemyManager"
import Singleton from "../Base/Singleton"
import { ILevel, ITile } from "../levels"
import { BurstManager } from "../Scripts/Burst/BurstManager"
import { DoorManager } from "../Scripts/Door/DoorManager"
import { PlayerManager } from "../Scripts/Player/playerManager"
import { SmokeManager } from "../Scripts/Smoke/SmokeManager"
import { SpikesManager } from "../Scripts/Spikes/SpikesManager"
import { TileManager } from "../Scripts/Tile/TileManager"
import { WoodenSkeletonManager } from "../Scripts/WoodenSkeleton/WoodenSkeletonMananger"

export type IRecord=Omit<ILevel,'mapInfo'>

export default class DataManager extends Singleton{
  static get Instance() {
    return super.GetInstance<DataManager>()
  }

  mapInfo: Array<Array<ITile>>
  tileInfo: Array<Array<TileManager>>
  mapRowCount:number=0
  mapColumnCount:number=0
  levelIndex:number=1
  player:PlayerManager
  door:DoorManager
  enemies:EnemyManager[]
  bursts:BurstManager[]
  spikes:SpikesManager[]
  smokes:SmokeManager[]
  records:IRecord[]

  reset(){
    this.mapInfo=[]
    this.tileInfo=[]
    this.mapRowCount=0
    this.mapColumnCount=0
    this.player=null
    this.door=null
    this.enemies=[]
    this.bursts=[]
    this.spikes=[]
    this.smokes=[]
    this.records=[]
  }
}
